From: Jan Beulich Date: Thu, 23 Apr 2015 11:08:40 +0000 (+0200) Subject: adjust assertion in alloc_heap_pages() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3372 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=c4b6bcf9f92970c74c6ec39ba78ed8941ce13faa;p=xen.git adjust assertion in alloc_heap_pages() Older gcc warns (and due to -Werror fails) on this ASSERT() now that "node" is of unsigned type. Make it more useful at once. Coverity-ID: 1055630 Signed-off-by: Jan Beulich Acked-by: Tim Deegan Reviewed-by: Andrew Cooper --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 986895d5d0..8500ed7c79 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -604,7 +604,7 @@ static struct page_info *alloc_heap_pages( } first_node = node; - ASSERT(node >= 0); + ASSERT(node < MAX_NUMNODES); ASSERT(zone_lo <= zone_hi); ASSERT(zone_hi < NR_ZONES);